<template>
  <div class="defaultStyle" :style="['background-color:' + bgColor, 'color:' + textColor]">{{ title }}</div>
</template>

<script>
export default {
  data() {
    return {
      obj: {
        defaultStyle: true
      }
    }
  },
  props: {
    title: {
      default: 'MyHeader 组件'
    },
    textColor: {
      type: [String, Number],
      default: 'white'
    },
    bgColor: {
      default: 'blue'
    }
  }
}
</script>

<style scoped>
  .defaultStyle{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    width: 300px;
    height: 50px;
    text-align: center;
    line-height: 50px;
  };
  .bgColor{};
  .textColor{}
</style>